<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>test variable</title>
		<link type="text/css" rel="stylesheet" href="../css/bootstrap.min.css" />
		<script src="../js/jquery-3.3.1.slim.min.js"></script>
	</head>
	<body>
		<input type="button" onclick="change();" />click<br />
		<input type="text" id="testValInput" value="" />
		<div class="form-control">
			<button class="btn-danger" onclick="testVal()">click</button>
		</div>
	</body>
	<script type="text/javascript">
		
		$(function(){
			setTimeout("outIterator()",5000);
		});
		
		function change() {
			var c = "blank";
			console.log(c);
			if (c != 'blank') {
				alert("not equal");
			} else {
				alert("equal");
			}
		}
		function testVal() {
			var va = $("#testValInput").val();
			if (va) {
				console.log("this val is : " + va);
			} else {
				console.log("this is undefined!");
			}
		}
		
		function outIterator() {
			setInterval("iterator()",5000);
		}
		
		function iterator() {
			window.location.reload();
		}
	</script>
</html>
